package com.byit.builder;

import com.alibaba.fastjson.JSONObject;

/**
 * JSON参数构造器
 *
 * @author wangx
 */
public class JsonBuilder {

    private JSONObject json = null;

    private JsonBuilder() {
        json = new JSONObject();
    }

    public static JsonBuilder newJson() {
        return new JsonBuilder();
    }

    public JsonBuilder setParam(String key, Object value) {
        json.put(key, value);
        return this;
    }

    public JSONObject ok() {
        return json;
    }
}